﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="PreviewAdHocInvoice.aspx.cs" Inherits="mojoPortal.Web.RS.SBM.PreviewAdHocInvoice" %>


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
    <head>
        <title></title>
        <meta content="text/html; charset=utf-8" http-equiv="Content-Type" />
        <meta content="en-us" http-equiv="Content-Language" />

    </head>
    <body style="">
        <form id="form1" runat="server">
        <asp:HiddenField ID="hfContactEmail" runat="server" />
        <center>
            <asp:Label ID="lblMessage" runat="server" Text="" ForeColor="Blue" Font-Bold="true" Font-Size="Large"></asp:Label>
        </center>

        <div id="divEmailFields" runat="server" visible="false">
        <table>
        <tr>
        <td>From:</td><td><asp:TextBox ID="txtFrom" runat="server" Width="200"></asp:TextBox></td>
        </tr>
        <tr>
        <td>To:</td><td><asp:TextBox ID="txtTo" runat="server" Width="200"></asp:TextBox>
        </tr>
        <tr>
        <td>CC:</td><td><asp:TextBox ID="txtCC" runat="server" Width="200"></asp:TextBox></td>
        </tr>
        <tr>
        <td>Subject:</td><td><asp:TextBox ID="txtSubject" runat="server" Width="400"></asp:TextBox></td>
        </tr>
        <tr><td></td><td><asp:Button ID="btnSend" runat="server" Text="Send Email" OnClick="btnSend_Click" /></td></tr>
        </table>
        </div>
        <div id="divButtons" runat="server">
        <asp:Button ID="btnEmail" runat="server" Text="Email" OnClick="btnEmail_Click" />
        &nbsp;&nbsp;&nbsp;
        <asp:Button ID="btnPrint" runat="server" Text="Print" OnClick="btnPrint_Click" />
        </div>

        <asp:Repeater ID="repeatInvoiceList" runat="server" OnItemDataBound="repeatInvoiceList_ItemDataBound">
        <HeaderTemplate>
        <table>
        <tr><td colspan="4" align="center"><h2>Invoice</h2></td></tr>
        <tr>
        <td colspan="2">
        <asp:Label ID="lblCompanyName" runat="server" Text="" Font-Bold="True" Font-Size="Medium"></asp:Label>
        <br />
        <asp:Literal ID="litCompanyFullAddress" runat="server" Text=""></asp:Literal>
        </td>
        <td>
        <asp:Image ID="imgPaid" runat="server" ImageUrl="~/RS/SBM/Images/paid.png" Visible="false" />
        </td>
        <td align="right">
            <table>
            <tr><td align="right" nowrap><b>Due Date:</b></td><td><asp:Label ID="lblDueDate" runat="server"></asp:Label>
            </td></tr>
            <tr><td align="right" nowrap><b>Invoice Num:</b></td><td><asp:Label ID="lblInvoiceNum" runat="server"></asp:Label>
            </td></tr>
            <tr><td align="right" nowrap><b>PO Num:</b></td><td><asp:Label ID="lblPONum" runat="server"></asp:Label>
            </td></tr>
            </table>
        </td>        
        </tr>

        <tr><td colspan="4"><br /><hr /><br /></td></tr>
        <tr>
        <td colspan="4">
        <table>
            <tr>
            <td align="right" valign="top"><b>Bill To:</b></td>
            <td>
                <asp:Label ID="lblBillingContact" runat="server"></asp:Label>
                <br />
                <asp:Label ID="lblBillingAddress" runat="server"></asp:Label>
            </td>
            </tr>
            <tr>
                <td align="right" nowrap><b>Job Address:</b></td>
                <td><asp:Label ID="lblJobAddress" runat="server"></asp:Label></td>
            </tr>
            <tr><td colspan="2"><br /></td></tr>
            <tr><td align="right" nowrap><b>Additional Instruction:</b></td><td><asp:Label ID="lblAdditionalInstruction" runat="server" ></asp:Label></td></tr>
            <tr><td align="right"><b>Terms:</b></td><td><asp:Label ID="lblTerms" runat="server" ></asp:Label></td></tr>        
        </table>
        </td>
        </tr>
        
        <tr><td colspan="4"><br /><hr /><br /></td></tr>


        <tr align="left"><th width="40">Qty</th><th width="400">Description</th><th width="150">Rate</th><th>Amount</th></tr>
        </HeaderTemplate>
        <ItemTemplate>
        <tr><td><%# Eval("Quantity").ToString() %></td><td><%# Eval("Description").ToString() %></td><td><%# Eval("Rate").ToString() %></td><td><%# Eval("LaborCost").ToString() %></td></tr>
        </ItemTemplate>
        <FooterTemplate>
        <tr><td></td><td></td><td align="right" nowrap><b>Tax:</b></td><td><asp:Label ID="lblTaxAmount" runat="server" Text=""></asp:Label></td></tr>
        <tr><td></td><td></td><td align="right" nowrap><b>Additional Fee:</b></td><td><asp:Label ID="lblAdditionalFee" runat="server" Text=""></asp:Label></td></tr>
        <tr><td colspan="4"><hr /></td></tr>
        <tr><td></td><td></td><td align="right" nowrap><b>SubTotal:</b></td><td><asp:Label ID="lblSubTotal" runat="server" Text=""></asp:Label></td></tr>
        <tr><td></td><td></td><td align="right" nowrap><b>Additional Discount:</b></td><td><asp:Label ID="lblAdditionalDiscount" runat="server" Text=""></asp:Label></td></tr>
        <tr><td></td><td></td><td align="right" nowrap><b>Balance Due:</b></td><td><asp:Label ID="lblBalanceDue" runat="server" Text=""></asp:Label></td></tr>
        </table>
        </FooterTemplate>
        </asp:Repeater>

     
        </form>
    </body>
</html>

